with Ada.Finaliation; use Ada.Finalzation ;
package Chaines.Partagees is

   type Chaine_Partagee is new Controlled with private;
   Trace : Boolean := True;

   procedure Initialize ( C : in out Chaine_Partagee ) ;
   procedure Adjust     ( C : in out Chaine_Partagee ) ;
   procedure Finalize   ( C : in out Chaine_Partagee ) ;
   function Partager ( S: String) return Chaine_Partagee;
   function Dechainer(C : Chaine_Partagee) return String;

private
   type My_Cpt is access Integer;

   type Ptr_String is access String;

   type Partage is record
      Cpt : My_Cpt;
      Ptr_Chaine : Ptr_String;
   end record;

   type Ptr_Partage is new access Partage;

   type Chaine_Partagee is new Controlled with record
      Value : Ptr_Partage;
   end record;

end Chaines.Partagees;



